<?php

/**
 * 网站后台路由登陆
 */
Route::group(['namespace' => 'Admin', 'prefix' => 'admin'],function() {
    Route::get('/login', 'IndexController@login');
    Route::post('/login', 'IndexController@toLogin');
    //无权限展示的页面路由
    Route::get('/nopermission', function (){
        return View::make('admin.index.nopermission');
    });
});

//编辑器文件上传
Route::post('/editor-uploads', 'Admin\OtherController@toUploads');

/**
 * 网站后台首页面框架 后台欢迎页
 */
Route::group(['middleware'=>'adminAuth', 'namespace' => 'Admin', 'prefix' => 'admin'],function() {
	Route::get('/', 'IndexController@index');
	Route::get('/welcome', 'IndexController@welcome');
	//退出登录
    Route::get('/logout','IndexController@logout');
});

